Introduction

LATEX provides a reasonably powerful picture drawing capability. There are many useful commands provided although the user-interface has room for improvement. The commands described in this document aim to achieve a simpler and more powerful interface.

Most picture drawing commands require explicit specification of coordinates for every <#38#>object<#38#>. Although explicit coordinates is the basis of the picture environment, it is possible to provide higher level commands which reduce the amount of coordinates that need to be manually calculated. There are basically two approaches that can be taken in designing such commands:

The obvious advantage of having commands that fall into the above categories is that not only they are easier to specify initially, but any subsequent modification to the layout requires minimal recalculations. For instance, to modify the coordinates in a 3 statement plotting n objects requires recalculation of at most 4 coordinates, whereas the equivalent 4 statements may require upto 2n calculations and/or recalculations.

Another frequently used command, 5 has severe limitations and drawbacks. The arguments that the 6 command expects are very non-intuitive and requires extensive calculations --- often the thought process in writing a 7 command involves:

  1. calculating the coordinates of the two end-points.
  2. calculating the horizontal and vertical distance.
  3. figuring out if the desired slope is available and if not then repeating steps 1 and 2 till a satisfactory slope is achieved.
  4. translating above into an (x,y) pair for specifying a slope and a horizontal distance for specifying the length of the line.

Above mechanism is a cumbersome way of specifying a line. It also has the drawback that the length of the shortest line of different slopes that can be drawn is different; for instance, assuming 8, 9 is the shortest line of the given slope that can be drawn; it is considerably longer than the available line segment of this slope --- 60.8pt rather than about 11pt. It should be emphasized that this is a drawback of only the implementation of the 10 command and is not an inherent limitation. This report describes a few line drawing commands all of which overcome such a drawback, while providing a simpler syntax. They all take, as arguments, only the coordinates of the end-points, thus eliminating all other steps involved in specifying a line; it also seems to be a natural way of perceiving a line in an environment where all the work is done in terms of coordinates.

A few new commands are developed and described in this report. They provide a simpler syntax and a higher-level user-interface. Also some of the commands permit one to plot objects that were previously cumbersome or difficult to plot. All existing commands still remain accessible. With the new commands it should now be possible to make pictures with less effort and make more sophisticated pictures than was possible earlier.